package com.demiroot.server;

import java.util.Map;

import com.demiroot.server.HeaderData.HeaderField;

public class HTTPRequestImpl implements HTTPResquest {
	private byte[] cont;
	private HeaderData head;
	private Server server;
	private Map<String,String> vars;
	private ServerSession ss;
	
	public HTTPRequestImpl(byte[] con, HeaderData head, Server s, Map<String, String> v) {
		cont = con;
		this.head = head;
		server = s;
		vars = v;
	}
	
	public HTTPRequestImpl(byte[] con, HeaderData head, Server s, Map<String, String> v, ServerSession ss) {
		this(con, head, s, v);
		this.ss = ss;
	}
	

	@Override
	public byte[] getContent() {
		return cont;
	}

	@Override
	public HeaderData getHeader() {
		return head;
	}

	@Override
	public Server getServer() {
		return server;
	}

	@Override
	public Map<String, String> getVars() {
		return vars;
	}


	@Override
	public ServerSession getSession() {
		return ss;
	}


	@Override
	public void setSession(ServerSession ss) {
		this.ss = ss;
	}

	@Override
	public void setVars(Map<String, String> vars) {
		this.vars = vars;
	}
}
